import React from 'react';
import { ViewBar } from 'view-ui';
import * as  echarts from 'echarts';

export default () => {
  const Option = {
    xAxis: {
      type: 'category',
      data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
    },
    yAxis: {
      type: 'value'
    },
    series: [
      {
        data: [120, 200, 150, 80, 70, 110, 130],
        type: 'bar'
      }
    ]
  };
  
  return (
    <div>
      <header style={{ margin: '20px 0' }}>基础柱状图</header>
      <ViewBar 
        option={Option as echarts.EChartsOption}
        styles={{ width: '100%', height: '400px' }}
      ></ViewBar>
    </div>
  );
}
